Repository navigation
Fix problems in hello_world - #649
Conversation
…y changes and argument updates
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
jan-wassenberg
left a comment
There was a problem hiding this comment.
Thanks for updating this example code :)
| // Placeholder for internal init, do not modify. | ||
| } | ||
| int main(int argc, char **argv) { { | ||
| // Placeholder for internal init, do not modify. |
There was a problem hiding this comment.
This placeholder is no longer necessary and can be removed :)
|
Merging failed and I've been investigating why. Just realized that the patch is targeting main branch, but this doesn't work with our tooling. Can you please send a PR for the dev branch? |
I have change the target |
|
There were several merge issues. I've patched the PR and we will land it soon. |
This pull request makes several updates to the
examples/hello_worldproject, including configuration changes, dependency updates, and code improvements. The most important changes involve upgrading dependencies, modifying runtime logic, and refining the documentation.Dependency Updates:
I will rely on updating to the latest version that can compile normally (the original dependency version will cause header files to be missing).
examples/hello_world/CMakeLists.txt: Updated thehighwayandsentencepiecedependencies to newer Git tags (bfc36a6e633af94e63ac4b91c687bf0354cb24e0and9045b2f60fa2b323dfac0eaef8fc17565036f9f9, respectively). Also updated thegemma.cppdependency to a newer Git tag (4a924f179448dc83e46a2af9520c61b4ef56174c). [1] [2]Code Improvements:
examples/hello_world/run.cc: Refactored theaccept_tokenlogic inmodel.Generateto usestd::function<bool(int, float)>and replacedcontainswithfindfor better compatibility and clarity.examples/hello_world/run.cc: Fixed a minor formatting issue in themainfunction declaration by adjusting whitespace.Documentation Updates:
examples/hello_world/README.md: Updated the example command to rename the--compressed_weightsflag to--weightsfor consistency with the code.